/*
 *  Copyright:  (C) 2018 LingYun IoT System Studio
 *              All rights reserved.
 *
 *  File name:  stat.c
 *Description:  Print the information of stat.c.
 *
 *    Version:  1.1
 *     Author:  Guo Wenxue <guowenxue@gmail.com>
 *		        Copied by Zhu Tianyin <zhuty_cn@163.com>
 *  ChangeLog:  1.0  Release initial version in 2018.
 *              1.1  Copy and change some details on "01/06/2021".
 */
#include <stdio.h>
#include<unistd.h>
#include <sys/types.h>
#include <sys/stat.h>

int main(int argc, char **argv)
{
    struct  stat    stbuf;
    
    stat("stat.c", &stbuf);
    printf("File Mode: %o Real Size:%luB, Space Size: %luB\n",  stbuf.st_mode, stbuf.st_size,stbuf.st_blksize);

    return 0;
}
